﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RSSReader.DAL;

namespace RSSReader.Repository
{
  public interface IRssRepository
  {
    void SaveChanges();

    ApplicationUser GetUserByUserName(string userName);
    ApplicationUser GetUser(string id);
    ApplicationUser GetUser(string userName, string passwordHash);
    IEnumerable<ApplicationUser> GetUsers();
    void AddUser(ApplicationUser user);

    IEnumerable<UserSubscriptionVW> GetUserSubscriptions(string userId);
    IEnumerable<Source> GetSources();
    IEnumerable<Source> GetSources(IEnumerable<string> urls);
    IEnumerable<Source> GetSources(IEnumerable<int> sourceIds);
    void AddSource(Source source);
    IEnumerable<Subscription> GetSubscriptions(string userId);
    IEnumerable<Subscription> GetSubscriptions(string userId, IEnumerable<int> sourceIds);
    void AddSubscription(Subscription sub);

    IEnumerable<Article> GetArticles(IEnumerable<string> url);
    void AddArticle(Article article);

    IEnumerable<UserArticle> GetUserArticles(string userId, IEnumerable<int> articleIds);
    void AddUserArticle(UserArticle userArticle);

    IEnumerable<UserArticleVW> GetUserArticlesVW(string userId, IEnumerable<string> urls);
    IEnumerable<UserArticleVW> GetUserFavorites(string userId);
  }
}
